﻿using System;
using System.Xml.Serialization;

namespace CodeContrib.Tests
{
	public class Employee
	{
		[XmlElement("dateOfBirth", Order = 2)]
		public DateTime DateOfBirth { get; set; }

		[XmlElement("id", Order = 0)]
		public Guid Id { get; set; }

		[XmlElement("uri", Order = 1)]
		public string Uri { get; set; }

		public override bool Equals(object obj)
		{
			var other = obj as Employee;

			if (other == null)
			{
				return false;
			}

			if (!Equals(Id, other.Id))
			{
				return false;
			}

			if (!Equals(DateOfBirth, other.DateOfBirth))
			{
				return false;
			}

			if (!Equals(Uri, other.Uri))
			{
				return false;
			}

			return true;
		}

		public override int GetHashCode()
		{
			return base.GetHashCode();
		}
	}
}